{LAYOUT_CONTENT}
<script src="__PUBLIC__/Chart.min.js"></script>
<div class="ui stackable grid container">
	<div class="ui breadcrumb row">
		<a class="section">浏览统计</a> <i class="right arrow icon divider"></i> <a
			class="section">概况</a>
	</div>
	
	<!-- 访问统计 -->
	<div class="eight wide column">
		<h2>BUG级别统计</h2>
		<div>
			<canvas id="level"></canvas>
		</div>

	</div>
	<div class="eight wide column">
		<h2>BUG项目统计</h2>
		<div>
			<canvas id="project"></canvas>
		</div>
	</div>
	<div class="sixteen wide column">
		<h2>BUG发现数量</h2>
		<div>
			<canvas id="finder"></canvas>
		</div>
	</div>


</div>
<script>
	var randomScalingFactor = function() {
		return Math.round(Math.random() * 100)
	};
	var projectLineChartData = {
		labels : [ '{implode("','",$project['project'])}' ],
		datasets : [
				{
					label : "发现Bug数量",
					fillColor : "rgba(220,220,220,0.2)",
					strokeColor : "rgba(220,220,220,1)",
					pointColor : "rgba(220,220,220,1)",
					pointStrokeColor : "#fff",
					pointHighlightFill : "#fff",
					pointHighlightStroke : "rgba(220,220,220,1)",
					data : [ {implode(",",$project['count'])} ]
				}, ]

	};
	var finderBarData = {
			labels : ['{implode("','",$finder['finder'])}'],
			datasets : [
				{
					fillColor : "rgba(220,220,220,0.5)",
					strokeColor : "rgba(220,220,220,1)",
					data : [{implode(",",$finder['count'])}]
				}
			]
		};
	var levelpieData = [ {
		value : {$level['count'][0]},
		color : "#F7464A",
		highlight : "#FF5A5E",
		label : "{$level['level'][0]}"
	}, {
		value : {$level['count'][1]},
		color : "#46BFBD",
		highlight : "#5AD3D1",
		label : "{$level['level'][1]}"
	}, {
		value : {$level['count'][2]},
		color : "#FDB45C",
		highlight : "#FFC870",
		label : "{$level['level'][2]}"
	}

	];

	window.onload = function() {
		var finder = document.getElementById("finder").getContext("2d");
		window.myLine = new Chart(finder).Bar(finderBarData, {
			responsive : true
		});
		var project = document.getElementById("project").getContext("2d");
		window.myLine = new Chart(project).Line(projectLineChartData, {
			responsive : true
		});
		var mokuai = document.getElementById("level").getContext("2d");
		window.myLine = new Chart(mokuai).Pie(levelpieData, {
			responsive : true
		});
		
	}
</script>
{/LAYOUT_CONTENT}
